package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Account  string `gorm:"Type:varchar(20);not null;comment:用户名"`
	Password string `gorm:"Type:varchar(32);not null;comment:密码"`
}

func (u *User) FindUserByAccount(db *gorm.DB, account string) error {
	return db.Debug().Where("account=?", account).Find(u).Error
}
